<template>
  <div style="padding:0;">
    <event-list ref="eventList" v-show="isShow == 'eventList'" @change="changeList"/>
    <company-list ref="companyList" v-if="isShow == 'companyList'" @change="changeList"/>
  </div>
</template>
<script>
import eventList from './components/eventList';
import companyList from './components/companyList';
export default {
  components:{
    eventList,
    companyList
  },
  data() {
    return{
      isShow: 'eventList'
    }
  },
  created(){
  },
  methods:{
    changeList(data,type){
      this.isShow = type;
      setTimeout(() => {
        this.$refs[type].init(data);
      },100);
    }
  }

}
</script>